package com.example.springbootweb_comprehensiveexample.controller;

import com.example.springbootweb_comprehensiveexample.pojo.Result;
import com.example.springbootweb_comprehensiveexample.service.EmpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
public class LogOutController {

    @Autowired
    private EmpService empService;

    @PostMapping("/logout")
    public Result logOut(){

        log.info("登出");
        String username = "logout";
        String password = "logout";
        empService.logout(username, password);
        return Result.error("退出登录");

    }

}
